.container
	.row
		.page-header.clearfix
			h1=title
			.col-md-4
				small 电影狙击手
			.col-md-8
				form(method='GET',action='/results/')
					.input-group.col-sm-4.pull-right
						input.form-control(type='text',name='q',placeholder='输入关键字搜索')
						span.input-group-btn
							button.btn.btn-default(type='submit') 搜索
.navbar.navbar-default.navbar-fixed-top
	.container
		.navbar-header
			a.navbar-brand(href='/') 电影狙击手
		ul.nav.navbar-nav
			li.active
				a(href='/') 网站首页
			li
				a(href='/admin/movie/list') 电影管理
			li
				a(href='/admin/category/list') 分类管理
			li
				a(href='/admin/movie') 添加电影
			li
				a(href='/admin/category/new') 添加分类
		if user
			p.navbar-text.navbar-right
				span 欢迎您，#{user.name}
				span &nbsp;|&nbsp;
				a.navbar-link(href='/logout') 退出
		else
			p.navbar-text.navbar-right
				a.navbar-link(href='#',data-toggle='modal',data-target="#signupModal") 注册
				span &nbsp;|&nbsp;
				a.navbar-link(href='#',data-toggle='modal',data-target="#loginModal") 登录
#signupModal.modal.fade
	.modal-dialog
		.modal-content
			form(method="POST",action="/user/signup")
				.modal-header 注册
				.modal-body
					.form-group
						label(for="signupName") 用户名
						input#signupName.form-control(name="user[name]",type="text")
					.form-gourp
						label(for="signupPassword") 密码
						input#signupPassword.form-control(name="user[password]",type="text")
				.modal-footer
					button.btn.btn-default(type="button",data-dismiss="modal") 关闭
					button.btn.btn-success(type="submit") 提交
#loginModal.modal.fade
	.modal-dialog
		.modal-content
			form(method="POST",action="/user/login")
				.modal-header 登录
				.modal-body
					.form-group
						label(for="loginName") 用户名
						input#signupName.form-control(name="user[name]",type="text")
					.form-gourp
						label(for="loginPassword") 密码
						input#signupPassword.form-control(name="user[password]",type="text")
				.modal-footer
					button.btn.btn-default(type="button",data-dismiss="modal") 关闭
					button.btn.btn-success(type="submit") 提交